Optimal. Leaf size=314 \[ \frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {ArcTan}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}+\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 314, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 9, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {3633, 3610,
3615, 1182, 1176, 631, 210, 1179, 642} \begin {gather*} \frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {ArcTan}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {ArcTan}\left (\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}+1\right )}{\sqrt {2} a d^{5/2} f}+\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}+\sqrt {d}\right )}{\sqrt {2} a d^{5/2} f}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (a+i a \tan (e+f x)) (d \tan (e+f x))^{3/2}}-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 1182
Rule 3610
Rule 3615
Rule 3633
Rubi steps
\begin {align*} \int \frac {1}{(d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))} \, dx &=\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}-\frac {\int \frac {-\frac {7 a d}{2}+\frac {5}{2} i a d \tan (e+f x)}{(d \tan (e+f x))^{5/2}} \, dx}{2 a^2 d}\\ &=-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}-\frac {\int \frac {\frac {5}{2} i a d^2+\frac {7}{2} a d^2 \tan (e+f x)}{(d \tan (e+f x))^{3/2}} \, dx}{2 a^2 d^3}\\ &=-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}-\frac {\int \frac {\frac {7 a d^3}{2}-\frac {5}{2} i a d^3 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx}{2 a^2 d^5}\\ &=-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}-\frac {\text {Subst}\left (\int \frac {\frac {7 a d^4}{2}-\frac {5}{2} i a d^3 x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a^2 d^5 f}\\ &=-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}-\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {Subst}\left (\int \frac {d+x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a d^2 f}-\frac {\left (\frac {7}{4}+\frac {5 i}{4}\right ) \text {Subst}\left (\int \frac {d-x^2}{d^2+x^4} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a d^2 f}\\ &=-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}--\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}+2 x}{-d-\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}--\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {d}-2 x}{-d+\sqrt {2} \sqrt {d} x-x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{8}-\frac {5 i}{8}\right ) \text {Subst}\left (\int \frac {1}{d-\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a d^2 f}-\frac {\left (\frac {7}{8}-\frac {5 i}{8}\right ) \text {Subst}\left (\int \frac {1}{d+\sqrt {2} \sqrt {d} x+x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{a d^2 f}\\ &=\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}--\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}\\ &=\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \tan ^{-1}\left (1-\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{4}-\frac {5 i}{4}\right ) \tan ^{-1}\left (1+\frac {\sqrt {2} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{\sqrt {2} a d^{5/2} f}+\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)-\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {\left (\frac {7}{8}+\frac {5 i}{8}\right ) \log \left (\sqrt {d}+\sqrt {d} \tan (e+f x)+\sqrt {2} \sqrt {d \tan (e+f x)}\right )}{\sqrt {2} a d^{5/2} f}-\frac {7}{6 a d f (d \tan (e+f x))^{3/2}}+\frac {5 i}{2 a d^2 f \sqrt {d \tan (e+f x)}}+\frac {1}{2 d f (d \tan (e+f x))^{3/2} (a+i a \tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.52, size = 273, normalized size = 0.87 \begin {gather*} \frac {\sec ^3(e+f x) \left (54 i \cos (e+f x)-22 i \cos (3 (e+f x))+16 \sin (e+f x)-(21+15 i) \log \left (\cos (e+f x)+\sin (e+f x)+\sqrt {\sin (2 (e+f x))}\right ) \sqrt {\sin (2 (e+f x))}+(21+15 i) \cos (2 (e+f x)) \log \left (\cos (e+f x)+\sin (e+f x)+\sqrt {\sin (2 (e+f x))}\right ) \sqrt {\sin (2 (e+f x))}-(15-21 i) \log \left (\cos (e+f x)+\sin (e+f x)+\sqrt {\sin (2 (e+f x))}\right ) \sin ^{\frac {3}{2}}(2 (e+f x))-(15+21 i) \text {ArcSin}(\cos (e+f x)-\sin (e+f x)) \sqrt {\sin (2 (e+f x))} \left (2 i \sin ^2(e+f x)+\sin (2 (e+f x))\right )+16 \sin (3 (e+f x))\right )}{48 a d f (d \tan (e+f x))^{3/2} (-i+\tan (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.15, size = 133, normalized size = 0.42
method | result | size |
derivativedivides | \(\frac {2 d^{2} \left (-\frac {1}{3 d^{3} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {i}{d^{4} \sqrt {d \tan \left (f x +e \right )}}+\frac {-\frac {\sqrt {d \tan \left (f x +e \right )}}{i d \tan \left (f x +e \right )+d}+\frac {6 i \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {-i d}}\right )}{\sqrt {-i d}}}{4 d^{4}}-\frac {i \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {i d}}\right )}{4 d^{4} \sqrt {i d}}\right )}{f a}\) | \(133\) |
default | \(\frac {2 d^{2} \left (-\frac {1}{3 d^{3} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}+\frac {i}{d^{4} \sqrt {d \tan \left (f x +e \right )}}+\frac {-\frac {\sqrt {d \tan \left (f x +e \right )}}{i d \tan \left (f x +e \right )+d}+\frac {6 i \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {-i d}}\right )}{\sqrt {-i d}}}{4 d^{4}}-\frac {i \arctan \left (\frac {\sqrt {d \tan \left (f x +e \right )}}{\sqrt {i d}}\right )}{4 d^{4} \sqrt {i d}}\right )}{f a}\) | \(133\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 776 vs. \(2 (240) = 480\).
time = 0.40, size = 776, normalized size = 2.47 \begin {gather*} \frac {3 \, {\left (a d^{3} f e^{\left (6 i \, f x + 6 i \, e\right )} - 2 \, a d^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i}{4 \, a^{2} d^{5} f^{2}}} \log \left (-2 \, {\left (2 \, {\left (a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )} + a d^{3} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i}{4 \, a^{2} d^{5} f^{2}}} + i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - 3 \, {\left (a d^{3} f e^{\left (6 i \, f x + 6 i \, e\right )} - 2 \, a d^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i}{4 \, a^{2} d^{5} f^{2}}} \log \left (2 \, {\left (2 \, {\left (a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )} + a d^{3} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i}{4 \, a^{2} d^{5} f^{2}}} - i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - 3 \, {\left (a d^{3} f e^{\left (6 i \, f x + 6 i \, e\right )} - 2 \, a d^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {\frac {9 i}{a^{2} d^{5} f^{2}}} \log \left (-\frac {{\left ({\left (a d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} + a d^{2} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {9 i}{a^{2} d^{5} f^{2}}} + 3 i\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a d^{2} f}\right ) + 3 \, {\left (a d^{3} f e^{\left (6 i \, f x + 6 i \, e\right )} - 2 \, a d^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {\frac {9 i}{a^{2} d^{5} f^{2}}} \log \left (\frac {{\left ({\left (a d^{2} f e^{\left (2 i \, f x + 2 i \, e\right )} + a d^{2} f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {9 i}{a^{2} d^{5} f^{2}}} - 3 i\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a d^{2} f}\right ) - \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (19 \, e^{\left (6 i \, f x + 6 i \, e\right )} - 19 \, e^{\left (4 i \, f x + 4 i \, e\right )} - 35 \, e^{\left (2 i \, f x + 2 i \, e\right )} + 3\right )}}{12 \, {\left (a d^{3} f e^{\left (6 i \, f x + 6 i \, e\right )} - 2 \, a d^{3} f e^{\left (4 i \, f x + 4 i \, e\right )} + a d^{3} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {1}{\left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan {\left (e + f x \right )} - i \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.64, size = 220, normalized size = 0.70 \begin {gather*} -\frac {i \, \sqrt {2} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{2 \, a d^{\frac {5}{2}} f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} + \frac {3 i \, \sqrt {2} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{-4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{a d^{\frac {5}{2}} f {\left (-\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {\sqrt {d \tan \left (f x + e\right )}}{2 \, {\left (i \, d \tan \left (f x + e\right ) + d\right )} a d^{2} f} + \frac {2 \, {\left (3 i \, d \tan \left (f x + e\right ) - d\right )}}{3 \, \sqrt {d \tan \left (f x + e\right )} a d^{3} f \tan \left (f x + e\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.66, size = 171, normalized size = 0.54 \begin {gather*} \mathrm {atan}\left (\frac {2\,a\,d^2\,f\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {\frac {9{}\mathrm {i}}{4\,a^2\,d^5\,f^2}}}{3}\right )\,\sqrt {\frac {9{}\mathrm {i}}{4\,a^2\,d^5\,f^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (4\,a\,d^2\,f\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,\sqrt {-\frac {1{}\mathrm {i}}{16\,a^2\,d^5\,f^2}}\right )\,\sqrt {-\frac {1{}\mathrm {i}}{16\,a^2\,d^5\,f^2}}\,2{}\mathrm {i}-\frac {\frac {2{}\mathrm {i}}{3\,a\,f}+\frac {4\,\mathrm {tan}\left (e+f\,x\right )}{3\,a\,f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^2\,5{}\mathrm {i}}{2\,a\,f}}{-{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}+d\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}\,1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________